package com.example.pjy.service.impl;

import com.example.pjy.mapper.TotalScoreMapper;
import com.example.pjy.pojo.Academic;
import com.example.pjy.pojo.TotalScore;
import com.example.pjy.service.TotalScoreService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TotalScoreImpl implements TotalScoreService {

    @Resource
    private TotalScoreMapper totalScoreMapper;
//    @Override
//    public void insert(Total_Score total_score) {
//        total_scoreMapper.insert(total_score);
//    }
//
//    @Override
//    public void deleteById(int student_id){
//        total_scoreMapper.deleteById(student_id);
//    }
//
//    @Override
//    public void update(Total_Score total_score){
//        total_scoreMapper.update(total_score);
//    }
//
//    @Override
//    public List<Total_Score> selectAll(){
//        return total_scoreMapper.selectAll();
//    }
//
//    @Override
//    public Total_Score selectById(int student_id){
//        return total_scoreMapper.selectById(student_id);
//    }



    @Override
    public void add(TotalScore totalScore) {
        //补充属性值
        totalScoreMapper.add(totalScore);
    }




    @Override
    public List<TotalScore> list(){
        return totalScoreMapper.list();//只能查询当前用户的所有分类 告诉mapper层当前用户是谁
    }





    @Override
    public TotalScore findById(Integer student_id){
        TotalScore to = totalScoreMapper.findById(student_id);
        return to;
    }




    @Override
    public void updateto(TotalScore totalScore){
        totalScoreMapper.updateto(totalScore);
    }




    @Override
    public void delete(int StudentId){
        totalScoreMapper.delete(StudentId);
    }
}
